package java69.work717_2;

import java.util.Scanner;

public class PrograMonkey {
    static Scanner sc = new Scanner(System.in);
    private  String name;
    private  int age;
    private String type;
    private int year;
    private  String adress;
    private  String job;

    public PrograMonkey() {
    }
    public PrograMonkey(String name, int age, String type, int year, String adress, String work) {
        this.adress = adress;
        this.age = 15;//默认年龄为15
        this.name = name;
        this.type = type;
        this.job = job;
        this.year = year;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        if (age<15){
            System.out.println("IT从业人员必须年满15岁!默认年龄为15");
            this.age = 15;
        }else {
            this.age = age;
        }
    }

    public String getType() {
        return type;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public String getAdress() {
        return adress;
    }

    public void setAdress(String adress) {
        this.adress = adress;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public void work(){
        System.out.println("请输入工作单位");
        setAdress(sc.next());
        System.out.println("请输入职务");
        setJob(sc.next());
        System.out.println("姓名："+getName()+"，年龄："+getAge()+"，技术方向："
                +getType()+"，工作年限："+getYear()+"，工作单位："+getAdress()+"，职务"+getJob());
    }

}
